import Vue from 'vue'
import App from './App.vue'
import router from './router'

import './styles/index.less'

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import axios from './utils/request.js'

// 写一个全局组件
import MyArticlesChannel from './components/articlesChannel.vue'
import MyBreadCrumb from './components/breadCrumb.vue'
import MyArticlesCover from './components/articlesCover.vue'
import MyArticleAdd from './views/articleAdd/articleAdd.vue'
Vue.component('AaBb', {
  render: a => a('h1', 'aabb')
})
Vue.component('MyArticlesChannel', MyArticlesChannel)
Vue.component('MyBreadCrumb', MyBreadCrumb)
Vue.component('MyArticlesCover', MyArticlesCover)
Vue.component('MyArticleAdd', MyArticleAdd)

Vue.use(ElementUI)

Vue.config.productionTip = false

Vue.prototype.$axios = axios

Vue.prototype.$eventBus = new Vue()

new Vue({
  router,
  render: a => a(App)
}).$mount('#app')
